<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>Document</title>
 </head>
 <body>
  <script type="text/javascript">
 var str="Every man in the world! Every woman on earth!";

patt=/man/g;
str2=str.search(patt);
document.write(str2+"<br />");
/*
patt=/(wo)?man/g;
patt.compile(patt);
str2=str.replace(patt,"person");
document.write(str2);
*/
  
 
  </script>
 </body>
</html>
